<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    let s = prompt("请输入一个数字");//4
    if (s % 2 == 0) {
        console.log(s + "是一个偶数");
    }

    //在后，先打印后赋值，s = s + 1.txt
    console.log(s++);// 4
    console.log(s);// 5
    //在前，先赋值后打印
    console.log(++s);// 6

    console.log(++s > 6);//7
    //let i = i + 10;
    // let i += 10;
    let i = 1;
    i += 10;

    console.log(true ^ false);
    console.log(true ^ true);
    console.log(false ^ false);
    console.log("---------------------------------")
    console.log(5 & 3);// 0101   0011   0001
    console.log(5 | 3);// 0101   0011   0111
    console.log(5 ^ 3);// 0101   0011   0110
    console.log(5 << 2);// 0000 0101    0001 0100
    console.log(9 >> 2);// 1001 0010
    console.log(-8 >> 2);// 1000 1000   1000 0010
    console.log(-8 >>> 2);// 1000 0000 0000 0000 0000 0000 0000 1000
    let num3 = 100;
    console.log(num3.toString(2));
    console.log(parseInt("1000 0000 0000 0000 0000 0000 0000 1000", 2));
    console.log(parseInt("0101", 2));

    console.log(s % 2 == 0 ? "偶数" : "奇数");
    console.log(s % 2 == 0 ? num3 % 2==0 ? "num3" : "num311" : "奇数");
</script>
</body>
</html>